package co.edu.unal.satacredito.franchises.application;

import java.util.ArrayList;
import java.util.List;

import co.edu.unal.satacredito.franchises.infrastructure.dto.FranchiseDTO;

public class FranchiseFacade {

	public FranchiseDTO insertFranchise(FranchiseDTO franchiseDTO) {
		return franchiseDTO;
	}
	
	public List<FranchiseDTO> getAllFranchises() {
		return simulateFranchises();
	}

	private List<FranchiseDTO> simulateFranchises() {

		List<FranchiseDTO> franchises = new ArrayList<FranchiseDTO>();

		FranchiseDTO franchiseDTO = new FranchiseDTO();
		franchiseDTO.setCreditCardURLValidation("url");
		franchiseDTO.setDebitCardURLValidation("url");
		franchiseDTO.setId(1);
		franchiseDTO.setNameFranchise("VISA");
		franchiseDTO.setPassword("admin");
		franchiseDTO.setUserCompleteName("Test");
		franchiseDTO.setUsername("admin");

		franchises.add(franchiseDTO);

		FranchiseDTO franchiseDTO2 = new FranchiseDTO();
		franchiseDTO2.setCreditCardURLValidation("url");
		franchiseDTO2.setDebitCardURLValidation("url");
		franchiseDTO2.setId(2);
		franchiseDTO2.setNameFranchise("Master Card");
		franchiseDTO2.setPassword("admin");
		franchiseDTO2.setUserCompleteName("Test");
		franchiseDTO2.setUsername("admin");

		franchises.add(franchiseDTO2);

		FranchiseDTO franchiseDTO3 = new FranchiseDTO();
		franchiseDTO3.setCreditCardURLValidation("url");
		franchiseDTO3.setDebitCardURLValidation("url");
		franchiseDTO3.setId(3);
		franchiseDTO3.setNameFranchise("Amex");
		franchiseDTO3.setPassword("admin");
		franchiseDTO3.setUserCompleteName("Test");
		franchiseDTO3.setUsername("admin");

		franchises.add(franchiseDTO3);

		return franchises;
	}

}
